package com.itheima.order.service;

import com.itheima.order.mapper.OrderMapper;;
import com.itheima.pojo.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author ：mengw9
 * @date ：Created By 2020/9/22 17:38
 * @description：
 * @version:
 */
@Service
public class OrderService {

    @Autowired
    OrderMapper orderMapper;

    public List<Order> findAllOrder() {
        Example example = new Example(Order.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("username", "大牛");

        return this.orderMapper.selectByExample(example);

    }
}
